16x12r 2.2.0
Loading...
Searching...
No Matches
16x12 R Click Driver

API for configuring and manipulating 16x12 R Click driver. More...

Topics

 16x12 R Registers List
 List of registers of 16x12 R Click driver.
 16x12 R Registers Settings
 Settings for registers of 16x12 R Click driver.
 16x12 R MikroBUS Map
 MikroBUS pin mapping of 16x12 R Click driver.

Functions

void c16x12r_cfg_setup (c16x12r_cfg_t *cfg)
 16x12 R configuration object setup function.
err_t c16x12r_init (c16x12r_t *ctx, c16x12r_cfg_t *cfg)
 16x12 R initialization function.
err_t c16x12r_default_cfg (c16x12r_t *ctx)
 16x12 R default configuration function.
err_t c16x12r_write_reg (c16x12r_t *ctx, uint8_t reg, uint8_t data_in)
 16x12 R write register function.
err_t c16x12r_write_regs (c16x12r_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 16x12 R write registers function.
err_t c16x12r_read_reg (c16x12r_t *ctx, uint8_t reg, uint8_t *data_out)
 16x12 R read register function.
err_t c16x12r_read_regs (c16x12r_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 16x12 R read registers function.
void c16x12r_enable_device (c16x12r_t *ctx)
 16x12 R enable device function.
void c16x12r_disable_device (c16x12r_t *ctx)
 16x12 R disable device function.
void c16x12r_reset_device_i2c (c16x12r_t *ctx)
 16x12 R reset device I2C function.
void c16x12r_set_rst_pin (c16x12r_t *ctx, uint8_t state)
 16x12 R set reset pin state function.
uint8_t c16x12r_get_intb_pin (c16x12r_t *ctx)
 16x12 R get interrupt pin function.
err_t c16x12r_lock_page (c16x12r_t *ctx)
 16x12 R lock page function.
err_t c16x12r_unlock_page (c16x12r_t *ctx)
 16x12 R unlock page function.
err_t c16x12r_select_page (c16x12r_t *ctx, uint8_t page)
 16x12 R select page function.
err_t c16x12r_write_page_reg (c16x12r_t *ctx, uint16_t page_reg, uint8_t data_in)
 16x12 R write page register function.
err_t c16x12r_write_page_regs (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_in, uint8_t len)
 16x12 R write page registers function.
err_t c16x12r_read_page_reg (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_out)
 16x12 R read page register function.
err_t c16x12r_read_page_regs (c16x12r_t *ctx, uint16_t page_reg, uint8_t *data_out, uint8_t len)
 16x12 R read page registers function.
err_t c16x12r_fill_screen (c16x12r_t *ctx)
 16x12 R fill screen function.
err_t c16x12r_clear_screen (c16x12r_t *ctx)
 16x12 R clear screen function.
err_t c16x12r_set_pwm (c16x12r_t *ctx, uint8_t duty)
 16x12 R set PWM function.
err_t c16x12r_set_mode (c16x12r_t *ctx, uint8_t mode)
 16x12 R set mode function.
void c16x12r_set_led_state (c16x12r_t *ctx, uint8_t led_num, uint8_t state)
 16x12 R set LED state function.
err_t c16x12r_write_leds (c16x12r_t *ctx)
 16x12 R write LEDs function.
err_t c16x12r_draw_picture (c16x12r_t *ctx, const uint16_t *image)
 16x12 R draw picture function.
err_t c16x12r_write_char (c16x12r_t *ctx, uint8_t data_in)
 16x12 R write character function.
err_t c16x12r_write_string (c16x12r_t *ctx, uint8_t *data_in, uint16_t speed_ms)
 16x12 R write string function.

Detailed Description

API for configuring and manipulating 16x12 R Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ c16x12r_cfg_setup()

void c16x12r_cfg_setup ( c16x12r_cfg_t * cfg)

16x12 R configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See c16x12r_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ c16x12r_clear_screen()

err_t c16x12r_clear_screen ( c16x12r_t * ctx)

16x12 R clear screen function.

This function turns off all LEDs on the screen.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_default_cfg()

err_t c16x12r_default_cfg ( c16x12r_t * ctx)

16x12 R default configuration function.

This function executes a default configuration of 16x12 R Click board.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ c16x12r_disable_device()

void c16x12r_disable_device ( c16x12r_t * ctx)

16x12 R disable device function.

This function sets the SDB pin low to disable the device.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ c16x12r_draw_picture()

err_t c16x12r_draw_picture ( c16x12r_t * ctx,
const uint16_t * image )

16x12 R draw picture function.

This function draws a picture on the display from a 12-column buffer.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]image: Pointer to 12x16 image array.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_enable_device()

void c16x12r_enable_device ( c16x12r_t * ctx)

16x12 R enable device function.

This function sets the SDB pin high to enable the device.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ c16x12r_fill_screen()

err_t c16x12r_fill_screen ( c16x12r_t * ctx)

16x12 R fill screen function.

This function turns on all LEDs on the screen.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_get_intb_pin()

uint8_t c16x12r_get_intb_pin ( c16x12r_t * ctx)

16x12 R get interrupt pin function.

This function reads the logic state of the INTB pin.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
Pin state (0 or 1).
Note
None.

◆ c16x12r_init()

err_t c16x12r_init ( c16x12r_t * ctx,
c16x12r_cfg_t * cfg )

16x12 R initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See c16x12r_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ c16x12r_lock_page()

err_t c16x12r_lock_page ( c16x12r_t * ctx)

16x12 R lock page function.

This function locks the page to prevent further configuration.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_read_page_reg()

err_t c16x12r_read_page_reg ( c16x12r_t * ctx,
uint16_t page_reg,
uint8_t * data_out )

16x12 R read page register function.

This function reads a byte from a register on a selected page.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]page_reg: Combined page and register address.
[out]data_out: Output data byte.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_read_page_regs()

err_t c16x12r_read_page_regs ( c16x12r_t * ctx,
uint16_t page_reg,
uint8_t * data_out,
uint8_t len )

16x12 R read page registers function.

This function reads multiple bytes from a register range on a selected page.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]page_reg: Combined page and register address.
[out]data_out: Output data buffer.
[in]len: Number of bytes.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_read_reg()

err_t c16x12r_read_reg ( c16x12r_t * ctx,
uint8_t reg,
uint8_t * data_out )

16x12 R read register function.

This function reads a single byte from the selected register using I2C communication.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output data byte.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_read_regs()

err_t c16x12r_read_regs ( c16x12r_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

16x12 R read registers function.

This function reads multiple bytes starting from the selected register using I2C communication.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]reg: Starting register address.
[out]data_out: Output data buffer.
[in]len: Number of bytes to read.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_reset_device_i2c()

void c16x12r_reset_device_i2c ( c16x12r_t * ctx)

16x12 R reset device I2C function.

This function toggles the RST pin to perform an I2C reset.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ c16x12r_select_page()

err_t c16x12r_select_page ( c16x12r_t * ctx,
uint8_t page )

16x12 R select page function.

This function selects the target page for register access.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]page: Page number.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_set_led_state()

void c16x12r_set_led_state ( c16x12r_t * ctx,
uint8_t led_num,
uint8_t state )

16x12 R set LED state function.

This function sets a single LED state to ON or OFF.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]led_num: LED index (0?191).
[in]state: LED state (0=OFF, 1=ON).
Returns
None.
Note
None.

◆ c16x12r_set_mode()

err_t c16x12r_set_mode ( c16x12r_t * ctx,
uint8_t mode )

16x12 R set mode function.

This function sets the blinking mode for all LEDs.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]mode: Blinking mode (0?3).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_set_pwm()

err_t c16x12r_set_pwm ( c16x12r_t * ctx,
uint8_t duty )

16x12 R set PWM function.

This function sets the same PWM duty cycle to all LEDs.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]duty: PWM duty cycle (0?255).
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_set_rst_pin()

void c16x12r_set_rst_pin ( c16x12r_t * ctx,
uint8_t state )

16x12 R set reset pin state function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]state: Pin state (0 or 1).
Returns
None.
Note
None.

◆ c16x12r_unlock_page()

err_t c16x12r_unlock_page ( c16x12r_t * ctx)

16x12 R unlock page function.

This function unlocks the page to allow configuration.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_char()

err_t c16x12r_write_char ( c16x12r_t * ctx,
uint8_t data_in )

16x12 R write character function.

This function writes a single ASCII character to the display.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]data_in: ASCII character to write.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_leds()

err_t c16x12r_write_leds ( c16x12r_t * ctx)

16x12 R write LEDs function.

This function writes the local LED state buffer to the display.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_page_reg()

err_t c16x12r_write_page_reg ( c16x12r_t * ctx,
uint16_t page_reg,
uint8_t data_in )

16x12 R write page register function.

This function writes a byte to a register on a selected page.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]page_reg: Combined page and register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_page_regs()

err_t c16x12r_write_page_regs ( c16x12r_t * ctx,
uint16_t page_reg,
uint8_t * data_in,
uint8_t len )

16x12 R write page registers function.

This function writes multiple bytes to a register range on a selected page.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]page_reg: Combined page and register address.
[in]data_in: Data buffer to write.
[in]len: Number of bytes.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_reg()

err_t c16x12r_write_reg ( c16x12r_t * ctx,
uint8_t reg,
uint8_t data_in )

16x12 R write register function.

This function writes a single byte to the selected register using I2C communication.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_regs()

err_t c16x12r_write_regs ( c16x12r_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

16x12 R write registers function.

This function writes multiple bytes starting from the selected register using I2C communication.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]reg: Starting register address.
[in]data_in: Data buffer to be written.
[in]len: Number of bytes to write.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ c16x12r_write_string()

err_t c16x12r_write_string ( c16x12r_t * ctx,
uint8_t * data_in,
uint16_t speed_ms )

16x12 R write string function.

This function scrolls a null-terminated ASCII string across the display.

Parameters
[in]ctx: Click context object. See c16x12r_t object definition for detailed explanation.
[in]data_in: Pointer to string to display.
[in]speed_ms: Scrolling delay in milliseconds.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.